library(findMFDIA)
source("../R/SQLPrepare.R")
path <- ("/media/data/testdata/YestOsmo/")
sqlitefiles<-dir(path,"*.sqlite")
#x<-read.table("/cluster/home/biol/wwolski/R_Libs/findMFDIA/data/SwathWindows.txt",header=TRUE)
sqlitefiles

#filename<-"/cluster/scratch_xl/shareholder/imsb_ra/wolski/goldstandard/napedro_L120420_001_SW_0.sqlite"
con=createConnection(file.path(path,sqlitefiles[1]))
xx<-read.table("../data/SwathWindowLudo.txt",header=T)
xx
x<-mapSummary(con)
x
updateSwathWindows(con,xx)

for(filnam in sqlitefiles){
	print(filnam)
	con=createConnection(file.path(path,filnam))
	x[,"minMZsw"]
	x[,"maxMZsw"]
	updateSwathWindows(con,x)
}
